#ifndef __SOCKETUDP_H
#define __SOCKETUDP_H

#include <Address.h>
#include <types.h>
#include <Socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>

 
class SocketUDP : public Socket
{
 private:
   struct sockaddr_in saddrl, saddrr;
   enum SType type;
   
 public:
   SocketUDP(SocketUDP &sUDP);
   SocketUDP(Address addr, enum SType type);
   ~SocketUDP();
   
   int read(void *buf, size_t n);
   int write(void *buf, size_t n);
   void close();
};
#endif
